package com.example.pucha_xian.common;

import android.content.Context;
import android.widget.Toast;

import com.blankj.utilcode.util.StringUtils;

public class UserUtil {
    public static String address = "http://220.168.19.126:8899/";
    //public static String address = "http://192.168.1.85:8899/";
    public static String login = address + "loginapp";
    public static String showPoint = address + "findpoints";
    public static String showBackPoint = address + "findpoints";
    public static String updatepoint = address + "updatepoint";

    public static boolean ValidateUser(Context context, String phone, String password){
        if(StringUtils.isEmpty(phone)){
            Toast toast= Toast.makeText(context,"用户名为空", Toast.LENGTH_LONG);
            toast.show();
            return false;
        }
        if (StringUtils.isEmpty(password)){
            Toast toast= Toast.makeText(context,"密码为空", Toast.LENGTH_LONG);
            toast.show();
            return false;
        }
        return true;
    }

}
